home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 015a / testf121.zip / TESTIF.DOC next >
Text File  |  1993-03-15  |  9KB  |  238 lines

  1.     
  2.     Computer Tyme TESTIF * Version 1.21 * Release Date: 11-28-92
  3.     Copyright 1989-92 by Marc Perkel * All Rights Reserved
  4.     
  5.     Computer Tyme * 411 North Sherman, Suite 300 * Springfield Mo. 65802
  6.     Voice: 417-866-1222 * Modem: 417-866-1665 * Fax: 417-866-0135 * USA
  7.      
  8.     This program is part of a utilities package. Before registering it
  9.     you might want to try out some of the other programs in the package.
  10.      
  11.     You can download these other programs from our BBS at 417-866-1665 or
  12.     from our section on Compuserve. (GO COMPTYME) If you have any questions
  13.     feel free to call us.
  14.      
  15.          ┌─────────────────────────────────────────────────────┐
  16.          │ Evaluation Version. This program is not registered. │
  17.          │    If you want to use it you need to buy a copy.    │
  18.          └─────────────────────────────────────────────────────┘
  19.      
  20.     Price: $20/User, $75/Server, $395/Unlimited
  21.     
  22.     This program tests the system and returns dos error codes that can be used
  23.     to control the execution of .BAT files.
  24.     
  25.     Usage: TestIf VideoMode
  26.     
  27.     Example:
  28.       TESTIF VideoMode
  29.       IF ERRORLEVEL 7 GOTO MONO
  30.     
  31.     This program tests the system and returns dos error codes that can be used
  32.     to control the execution of .BAT files. Error codes range from 0 to 255.
  33.     Within this program are commands for reading system parameters and processing
  34.     them mathematically into useful error codes.
  35.     
  36.       REM This checks to see if selected screen is MONO or COLOR
  37.       TESTIF VideoMode
  38.       IF ERRORLEVEL 7 GOTO MONO
  39.       :COLOR
  40.          ....
  41.          GOTO END
  42.       :MONO
  43.          ....
  44.       :END
  45.     
  46.     VideoMode is a Testif command that returns the current video mode. If the
  47.     current mode is MONO then VideoMode returns a 7.
  48.     
  49.     With this command, if you have both MONO and COLOR screens on your computer,
  50.     and you want to set up a .BAT file to bring up a piece of software that is
  51.     installed different for mono and COLOR, Testif makes it easy.
  52.     
  53.     Testif has the capibility to test results to see if a command equals a
  54.     value.
  55.     
  56.       TESTIF VideoMode = 7
  57.     
  58.     Returns error code 1 if true and 0 if not true. A 1 is always returned to
  59.     indicate TRUE and 0 is returned to indicate FALSE. Operators include
  60.     =, [], [, ], [=, ]=. Note the square brackets replace the normal greater
  61.     than and less than symbols. That is becuase MS-DOS filters these characters
  62.     and therefore can't be used.
  63.     
  64.       TESTIF (Year = 93) and (Month = May)
  65.     
  66.     Testif supports all logical operators such as AND, OR, XOR, NOT. Multiple
  67.     conditions can be used. Year returns the year part of the system date. Month
  68.     returns the month part. May is a constant equal to 5. The error code result
  69.     will be 1 for true or 0 for false.
  70.     
  71.       TESTIF MemSize / 10
  72.     
  73.     MemSize returns the total memory size in K. Since this number is usually
  74.     larger than 255, (the maximum error code), we devide by 10. On a 640k
  75.     machine, the return code is 64. Notice that division is supported. Testif
  76.     supports the mathematical operators +, -, *, /, MOD, SHL, SHR, AND, OR, XOR.
  77.     All numbers are processed as signed 32 bit integers. It is up to you to
  78.     keep the result between 0 and 255 for meaningful results.
  79.     
  80.       TESTIF 5*(9+3)
  81.     
  82.     Interpretation is from left to right. Parentheses can be used to alter this
  83.     order. The above example returns 60.
  84.     
  85.       TESTIF FreeSpace(0) ] 4000000
  86.     
  87.     This checks freespace on the current drive (0). Other drives can also be
  88.     checked. The result is 1 if more than 4,000,000 bytes are free.
  89.     
  90.       TESTIF FileSize TESTIF.EXE / 1000
  91.     
  92.     This returns the filesize of TESTIF.EXE in K.
  93.     
  94.     To test your formulas, start the line with an @ sign. Testif will print the
  95.     return code on the screen.
  96.     
  97.        TESTIF @DosVersion
  98.        Return Code: 3
  99.     
  100.     
  101.     TESTIF Commands:
  102.     
  103.     SUN  Constant = 0
  104.     MON  Constant = 1
  105.     TUE  Constant = 2
  106.     WED  Constant = 3
  107.     THU  Constant = 4
  108.     FRI  Constant = 5
  109.     SAT  Constant = 6
  110.     
  111.     JAN  Constant = 1
  112.     FEB  Constant = 2
  113.     MAR  Constant = 3
  114.     APR  Constant = 4
  115.     MAY  Constant = 5
  116.     JUN  Constant = 6
  117.     JUL  Constant = 7
  118.     AUG  Constant = 8
  119.     SEP  Constant = 9
  120.     OCT  Constant = 10
  121.     NOV  Constant = 11
  122.     DEC  Constant = 12
  123.     
  124.     MONO Constant = 7
  125.     CO80 Constant = 3
  126.     BW80 Constant = 2
  127.     CO40 Constant = 1
  128.     BW40 Constant = 0
  129.     
  130.     VideoMode             Returns Current Video Mode
  131.     VideoPage             Returns Current Video Page
  132.     ScreenWidth           Returns Current Screen Width
  133.     Year                  Returns System Year            (88=1988)
  134.     Month                 Returns System Month
  135.     Day                   Returns System Day
  136.     DayOfWeek             Returns System Day of week     (0=SUN)
  137.     Hour                  Returns System Hour
  138.     Minute                Returns System Minute
  139.     Second                Returns System Second
  140.     WriteVerify           Returns if Write Verify is on
  141.     DosVersion            Returns Dos Version Number
  142.     MinorDosVersion       Returns Minor Dos Version Number
  143.     CurrentDrive          Returns Current Drive Number   (A: = 0)
  144.     Drives                Returns Number of Drives
  145.     Floppies              Returns Number of Floppy Drives
  146.     SerialPorts           Returns Number of Serial Ports
  147.     ParellelPorts         Returns Number of Parralel Ports
  148.     CapsLock              Tells if Caps Lock is on               (1=True)
  149.     NumLock               Tells if Num Lock is on                (0=False)
  150.     ScrollLock            Tells if Scroll Lock is on
  151.     MemSize               Returns Total Memory Size in K
  152.     Random                Returns a Random Number from 0 to 255.
  153.     SectorsPerCluster(n)  Returns Number of Sectors per Cluster  (0=Current Drive)
  154.     BytesPerSector(n)     Returns Number of Bytes per Sector     (1=A:)
  155.     FreeClusters(n)       Returns Number of Free Clusters        (2=B:)
  156.     TotalClusters(n)      Returns Total Number of Clusters       (3=C:)
  157.     FreeSpace(n)          Returns Free Space in Bytes            (4=D:)
  158.     TotalSpace(n)         Returns Total Space in Bytes
  159.     Exist <FileName>      Tells if File Exists
  160.     FileSize <FileName>   Returns File Sise in Bytes
  161.     FileAttr <FileName>   Returns File Attribute
  162.     FileDate <FileName>   Returns Date and Time as 32 bit Number
  163.     Mem(A:B)              Returns Byte at A:B
  164.     MemW(A:B)             Returns Word at A:B
  165.     Port(A)               Returns Byte at Part A
  166.     
  167.     =     True if A = B
  168.     []    True if A <> B
  169.     [     True if A < B
  170.     ]     True if A > B
  171.     [=    True if A <= B
  172.     ]=    True if A >= B
  173.     +     Returns A + B
  174.     -     Returns A - B
  175.     *     Returns A * B
  176.     /     Returns A / B
  177.     MOD   Returns A mod B
  178.     AND   Returns A and B
  179.     OR    Returns A or B
  180.     XOR   Returns A xor B
  181.     SHL   Returns A shl B  (Shift Left)
  182.     SHR   Returns A shr B  (Shift Right)
  183.     NOT   Returns not A
  184.     
  185.     ==========================================================
  186.  
  187.         Make Check             Computer Tyme               Order Form
  188.         Payable To:     411 North Sherman Suite 300
  189.                          Springfield Mo. 65802 USA
  190.  
  191.                Voice: (417) 866-1222 * Sales: (800) 548-5353
  192.                  Fax: (417) 866-0135 * BBS: (417) 866-1665
  193.                Compuserve: 71333,427 * GO COMPTYME
  194.  
  195.         =============================================================
  196.  
  197.         Company:     ________________________________________________
  198.  
  199.         Name:        ________________________________________________
  200.  
  201.         Address:     ________________________________________________
  202.  
  203.         City/St/Zip: ________________________________________________
  204.  
  205.         Phone:       ________________________________________________
  206.  
  207.         PO. Number:  ________________________________________________
  208.  
  209.         Got From:    ________________________________________________
  210.  
  211.         Comments:    ________________________________________________
  212.  
  213.         Comments:    ________________________________________________
  214.  
  215.  
  216.         ==> TESTIF * Version 1.21 * Release Date: 11-28-92
  217.  
  218.         ==> Price: $20/User, $75/Server, $395/Unlimited
  219.  
  220.  
  221.         Dos ToolBox: $59.95/User __    MarxMenu: $59.95/User __
  222.  
  223.         Network Survival Kit: (Inc. ToolBox/MarxMenu) $495/Server __
  224.  
  225.         Shipping:     Ground: $3 __    2nd Day:  $6 __
  226.  
  227.                       1 Day: $15 __    Foreign: $15 __
  228.  
  229.         Credit Card Number: _______________ Expiration Date: ________
  230.  
  231.         Signature: __________________________________________________
  232.  
  233.                   Master Card: __   Visa: __   Discover: __
  234.  
  235.                     * We do not take American Express *
  236.  
  237.         =============================================================
  238.